import { http } from "@/utils/http";
import { Result } from "@/api/index";

export type MenuVO = {
  id: string;
  menuName: string;
  parentId: string;
  menuOrder: number;
  path: string;
  component: string;
  query: string;
  isFrame: number;
  isCache: number;
  menuType: string;
  visible: number;
  status: number;
  perms: string;
  icon: string;
  remark: string;
  children: Array<MenuVO>;
};

export const menuTree = (data?: object) => {
  return http.request<Result<Array<MenuVO>>>(http.POST, "/menu/menuTree", {
    data
  });
};
